
local fileName = string.getModeName(...)
local ClassRef = class(fileName, app.mvc.ViewBase)

ClassRef.VIEW_ROOT_RES = Res.RecommendScene

function ClassRef:init()
    self.idx = self._data
    -- 推荐按钮事件
    self._ui.Button_lingqu:addClickEventListener(function()
        executeFunc(self._onOperate, "gotoAppShop")
    end)
    -- 关闭按钮事件
    self._ui.Button_back:addClickEventListener(function()
        executeFunc(self._onOperate, "hideRecommendPanel", self.idx)
        self:closeView()
    end)

    self._ui.Button_lingqu:setVisible(true)
    self._ui.text:setVisible(false)
end

function ClassRef:refreshRecommendText()
    self._ui.Button_lingqu:setVisible(false)
    self._ui.text:setVisible(true)
end

return ClassRef